/*
 * JOY.h
 *
 * Created: 12.09.2012 19:04:15
 *  Author: mariuvi
 */ 

/*!
 * @header		JOY.h
 * @discussion	This file contains all declarations for interfacing with the USB Joystick.
*/


#ifndef JOY_H_
#define JOY_H_

#include "definitions.h"


/*!
 * @discussion	A structing containing the joystick's status. Holds the x and y coordinates and the direction.
 */	
typedef struct
{
	int x;
	int y;
	Direction dir;
}JOY_Pos;


/*!
 * @function	JOY_button_init.
 * @discussion	Initializes the joystick button.
 * @result		None.
 */	
void JOY_button_init();


/*!
 * @function	JOY_read
 * @discussion	Reads the joystick's status from a private variable.
 * @result		The joystick's status contained in a JOY_pos struct.
 */	
JOY_Pos JOY_read();


/*!
 * @function	JOY_button_pressed
 * @discussion	Reads the joystick's button.
 * @result		TRUE if the button is pressed, FALSE else.
 */
 int JOY_button_pressed();



#endif /* JOY_H_ */